﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIDesigner.SurfaceProperties;

namespace UIDesigner.DesignContainers
{
    public class SurfaceButtons : List<SurfaceButtonEntry>
    {
        public SurfaceButtonEntry this[SurfaceButton eButton]
        {
            get
            {
                foreach (SurfaceButtonEntry objEntry in this)
                {
                    if (objEntry.SurfaceButton == eButton)
                    {
                        return objEntry;
                    }
                }

                return null;
            }
        }

        public bool Contains(SurfaceButton eButton)
        {
            foreach (SurfaceButtonEntry objEntry in this)
            {
                if (objEntry.SurfaceButton == eButton)
                {
                    return true;
                }
            }

            return false;
        }
    }
}
